package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.domain.Role;
import cn.wolfcode.crm.query.CustomerQueryObject;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    Employee login(@Param("name") String name, @Param("password") String password);
    List<Employee> selectForList(QueryObject qo);

    void insertRelation(@Param("employeeId")Long employeeId,@Param("roleId") Long roleId);

    Role queryByEmployeeId();

    void deleteRelation(Long employeeId);

    void batchDelete(Long[] ids);

    Employee selectByusername(String username);

    List<Employee> listByRoleSn(@Param("roleSns")String[] strings);

    List<Employee> listBySellerId(CustomerQueryObject qo);
}